import request from '@/utils/request'

export function list(form) {
  return request({
    url: 'api/docker/image/list',
    method: 'post',
    data: {
        server_id:form.server_id,
        image_tags: form.image_tags
    }
  })
}

export function search(server_id,image_name) {
  return request({
    url: 'api/docker/image/search',
    method: 'post',
    data: {
        server_id:server_id,
        image_name: image_name
    }
  })
}

export function pull(server_id,image_name,note) {
  return request({
    url: 'api/docker/image/pull',
    method: 'post',
    data: {
        server_id:server_id,
        image_name: image_name,
        note:note
    }
  })
}

export function remove(server_id,image_id,image_name) {
  return request({
    url: 'api/docker/image/remove',
    method: 'post',
    data: {
        server_id:server_id,
        image_id:image_id,
        image_name: image_name
    }
  })
}

export function fremove(server_id,image_id,image_name) {
  return request({
    url: 'api/docker/image/fremove',
    method: 'post',
    data: {
        server_id:server_id,
        image_id:image_id,
        image_name: image_name
    }
  })
}

export function detail(server_id,image_name) {
  return request({
    url: 'api/docker/image/detail',
    method: 'post',
    data: {
        server_id:server_id,
        image_name: image_name
    }
  })
}